<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>数字补0</title>
    <script>
        var a = prompt('请输入0-59其中一个数字');

        alert(a < 10 ? '0' + a : a);
    </script>
</head>

<body>

</body>

</html>